import {defineStore} from "pinia";

export const menuStore = defineStore("menu", {
    state: () => {
        return {
            isCollapsed: false,
        }
    },
    getters: {
        getCollapsed: () => {
            localStorage.getItem("isCollapsed");
            return this.isCollapsed;
        }
    },
    actions: {
        setCollapsed: (state, isCollapsed) => {
            localStorage.setItem("isCollapsed", isCollapsed);
            state.isCollapsed = isCollapsed;
        }
    }
});